Fix date-stamp regression in erc-fill-wrap
authorF. Jason Park <jp@neverwas.me>
Fri, 9 Feb 2024 04:28:56 +0000 (20:28 -0800)
committerF. Jason Park <jp@neverwas.me>
Mon, 27 May 2024 23:47:24 +0000 (16:47 -0700)
commit7aa91b299e9dd9f416a22658afed1a8edf323b30
treed2236c28fc67f4041f7b02e2b167629f832901d4
parent6888bbbe832e14c3aaaa2c9750ed27e577e0983d
Fix date-stamp regression in erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable)
(erc-fill-wrap-disable): Add and remove `erc-stamp--insert-date-hook'
member.
(erc-fill--wrap-continued-predicate): Add function-valued variable for
modules to influence `erc-fill--wrap-continued-message-p', which was
originally introduced as part of bug#60936.
(erc-fill--wrap-rejigger-last-message): Move toward beginning of file.
(erc-fill--wrap-unmerge-on-date-stamp): New function.
(erc-fill-wrap): Use `erc-fill--wrap-continued-predicate'.  Restore
recently deleted hunk that reset the wrap marker upon seeing a date
stamp.
* test/lisp/erc/erc-scenarios-fill-wrap.el: New file.
* test/lisp/erc/resources/fill/wrap/merge-datestamp.eld: New file.
lisp/erc/erc-fill.el
test/lisp/erc/erc-scenarios-fill-wrap.el [new file with mode: 0644]
test/lisp/erc/resources/fill/wrap/merge-datestamp.eld [new file with mode: 0644]